if 'key' in my_dict: del my_dict['key']
hh = {"a":3, "b":4, "c":5} # delete a entry del hh["b"] print(hh) # {'a': 3, 'c': 5}